
export const workOrderTypeList = [
    {
        value: 'platform_auto',
        label: '云平台自动判断',
    },
    {
        value: 'warning_judge',
        label: '告警自动生成',
    },
    {
        value: 'maintenance_report',
        label: '运维报修',
    },
    {
        value: 'hand_report',
        label: '手动添加',
    },
]

export const getWorkOrderTypeName = (workOrder) =>{

    for(let i = 0;i < workOrderTypeList.length; i++) {
        if(workOrder.type === workOrderTypeList[i].value){
            return workOrderTypeList[i].label
        }
    }
    return '未知类型'
}


export const workOrderStatusList = [
    {
        value: 'pending',
        label: '待接单',
    },
    {
        value: 'repairing',
        label: '维修中',
    },
    {
        value: 'processing',
        label: '待审核',
    },
    {
        value: 'completed',
        label: '已完成',
    },
]

export const getWorkOrderStatusName = (workOrder) =>{

    for(let i = 0;i < workOrderStatusList.length; i++) {
        if(workOrder.status === workOrderStatusList[i].value){
            return workOrderStatusList[i].label
        }
    }
    return '未知类型'
}